﻿<cfsilent>
	<cfscript>
		
		stringAdvice = getProperty("serviceFactory").getBean("stringAdvice");
		datetimeAdvice = getProperty("serviceFactory").getBean("datetimeAdvice");
		
		taskType = event.getArg("TT");
		taskId = event.getArg("TSK");
		evsId = event.getArg("ES");

		sql = "SELECT 
				a.msg_id, 
				a.suggest, a.suggest_date, 
				a.reply, a.reply_date 
				FROM t_evaluate_comment a 
				WHERE 
					a.task_id = :taskId 
				ORDER BY a.suggest_date DESC";
			
		queryObj = new Query( datasource=application.dnsSlave );
		queryObj.addParam( name="taskId", value=taskId, cfsqltype="cf_sql_varchar" );

		rs_comment = queryObj.execute( sql=sql ).getResult();

	</cfscript>
</cfsilent>

<cfif rs_comment.recordCount>

		<div class="mailContainer">
		
			<cfset row = 0 />
			<cfloop query="rs_comment">
			
				<cfset row++ />

				<div class="mailBox">
						
					<div class="index"><i><cfoutput>#row#</cfoutput></i></div>
						
					<div class="box">

						<div class="operation">
						</div>

						<div class="main">
							<div class="header">
								<b>发送时间:</b> 
								<span class="numeric"><cfoutput>#datetimeAdvice.formatDatetimeString( rs_comment.suggest_date, "YYYY-MM-DD" )#</cfoutput></span>
							</div>
							<div class="message">
								<b>◆</b>
								<div><cfoutput>#stringAdvice.HTMLEncode( rs_comment.suggest )#</cfoutput></div>
							</div>
							
							<cfif rs_comment.reply neq "NOPE">
							
								<div class="reply">
									<span class="bot2"></span>
									<span class="top2"></span>  
									<div><cfoutput>#stringAdvice.HTMLEncode( rs_comment.reply )#</cfoutput></div>
								</div>
								<div class="footer">
									<b>回复时间:</b> 
									<span class="numeric"><cfoutput>#datetimeAdvice.formatDatetimeString( rs_comment.reply_date, "YYYY-MM-DD" )#</cfoutput></span>
								</div>
								
							</cfif>

						</div>

					</div>
						
				</div>

			</cfloop>
	
		</div>

	<cfelse>
			
		<div class="systemNotice">
			<p>还没有学生提交反馈信息</p>
		</div>
			
</cfif>
